var indexPage = function() {
    var announcements;
    var first_show_announcement = true;
    var init = function() {
        $("img.lazy").lazyload();
        initSlider();
        $(".goods-game-selector").click(function() {
            $(this).siblings("li").removeClass("on");
            $(this).addClass("on");
            var appid = $(this).data("appid");
            var $root = $(this).parents(".l_Layout");
            var tab = $root.find(".market-link").data("tab");
            $root.find(".market-link").attr("href", "/market/" + BuffConfig.SteamAPP.APPID_MAPS[appid] + "#tab=" + tab);
            $root.find(".index-goods-list").hide();
            $root.find(".index-goods-list[data-appid=" + appid + "]").show();
            $root.find(".cover-image").hide();
            $root.find(".cover-image[data-appid=" + appid + "]").show();
            if (!first_show_announcement)
                updateAnnouncement(appid);
            $(window).scroll()
        });
        var appid = g.appid;
        if ([730, 570, 440, 252490].indexOf(appid) < 0) {
            appid = 730
        }
        $(".goods-game-selector[data-appid=" + appid + "]").click();
        if (first_show_announcement) {
            updateAnnouncement(g.appid);
            first_show_announcement = false
        }
    };